//! \file pipe.hpp
//! \brief Purewell Library Pipe Header
//! \author Yubin Lim (purewell@gmail.com)
//! \since 2008-01-25

#ifndef __PWHDR_PIPE_HPP__
#define __PWHDR_PIPE_HPP__

#include "pairfile.hpp"

namespace purewell
{

//! \brief Pipe.
class PWAPI PWPipe : public PWPairFile
{
public:
	//! \brief Initialize unnamed pipe.
	virtual bool initialize(void);

	virtual ssize_t write(const void* buf, size_t blen);
	virtual ssize_t read(void* buf, size_t blen);

public:
	explicit PWPipe();
	virtual ~PWPipe();

};

//! \brief Named pipe.
class PWAPI PWNamedPipe : public PWNamedFile
{
public:
	virtual bool initialize(const char* name, int flag, int perm);

public:
	explicit PWNamedPipe();
	virtual ~PWNamedPipe();

};


};

#endif//!__PWHDR_PIPE_HPP__

